<?php
/**
* Admin for CMS settings
*
* @author Mario Schillermann <info@rockit-flash.com>
* @encoding UTF-8 äöüßÖÄÜ
* @copyright © 2011 Mario Schillermann (info@rockit-flash.com)
* @license GNU GPL v2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
* @package Page
* @subpackage Index
* @link $HeadURL$
* @version SVN: $Id$
* @phpVersion >=5
* @todo
*/

class Login_Form_Login extends Zend_Form {
    /**
     * Index
     *
     * @return void
     */
    public function build()
    {
        $valid = array();
        $valid[] =
            array(
                'validator' => 'StringLength',
                'breakChainOnFailure' => true,
                'options' => array(
                    'max' => 100,
                )
            );
        $this->setName('login');
        $this->addElement(
            new Zend_Form_Element_Text(
                'name',
                array(
                    'label' => 'Benutzername',
                    'required' => TRUE,
                    'validators' => $valid,
                )
            )
        );
        $this->addElement(
            new Zend_Form_Element_Password(
                'password',
                array(
                    'label' => 'Passwort',
                    'required' => TRUE,
                    'validators' => $valid,
                )
            )
        );

        $this->addDisplayGroup(
            array(
                'name',
                'password',
            ),
            'groups',
            array("legend" => ""));

        return $this;
    }

}